﻿<h2>About</h2>
@{
	var about = new HtmlString((string)ViewData["about"]);
}
@if (Roles.IsUserInRole(User.Identity.Name, "Admin")){
	<div id="editable" contenteditable="true">
		<p>@about</p>
	</div>
	<script type="text/javascript">
		CKEDITOR.disableAutoInline = true;
		CKEDITOR.inline("editable", {
			on: {
				blur: function (event) {
					var data = { about: event.editor.getData() };
					$.post("About", data, null, "html");
				}
			}
		});
	</script>
}
else{
	<p>@about</p>
}